<?php
namespace Controllers;
class CommonController {
    public function response($tpl, $data = []) {
        $file = './Views/' . $tpl . '.tpl.php';
        if (!file_exists($file)) exit('模板文件' . $file . '不存在');
        extract($data);
        require_once $file;
    }
}